package com.fy.oa.zc.manager;

import java.util.Map;
import java.util.Set;

import org.springframework.jdbc.core.JdbcTemplate;

import com.fy.oa.zc.conf.FyOAConf;
import com.fy.oa.zc.domain.FySummaryView;
import com.fy.oa.zc.rest.FyOARestClient;
import com.fy.oa.zc.rest.FyOARestValuesBean;

public abstract class AFyOA_FormEventManager implements FyOA_FormEventManager {

	private Set<String> formNameSet;

	private Set<String> repeatFieldNameSet;

	public void setRepeatFieldNameSet(Set<String> repeatFieldNameSet) {
		this.repeatFieldNameSet = repeatFieldNameSet;
	}

	public void setFormNameSet(Set<String> formNameSet) {
		this.formNameSet = formNameSet;
	}

	protected Map<String, String> getValues(long summaryid) {
		return fyOARestClient.getFormValues(summaryid, formNameSet);
	}

	protected FyOARestValuesBean getValuesBean(long summaryid) {
		return fyOARestClient.getFormValues(summaryid, formNameSet, repeatFieldNameSet);
	}

	@Override
	public void setJdbcTemplate(JdbcTemplate jdbcTemplate) {
		this.jdbcTemplate = jdbcTemplate;
	}

	public void setFyOARestClient(FyOARestClient fyOARestClient) {
		this.fyOARestClient = fyOARestClient;
	}

	public void setFyOAConf(FyOAConf fyOAConf) {
		this.fyOAConf = fyOAConf;
	}

	protected FyOAConf fyOAConf;
	protected FyOARestClient fyOARestClient;
	protected JdbcTemplate jdbcTemplate;

	@Override
	public String dealProcessEvent(FySummaryView view, long affairid) {
		return null;
	}

	@Override
	public String dealFinishEvent(FySummaryView view, long affairid) {
		return dealFinishEvent( view) ;
	}
	
	protected String dealFinishEvent(FySummaryView view) {
		return null;
	}

	@Override
	public String dealStartEvent(FySummaryView view) {
		return null;
	}

	@Override
	public String dealStopEvent(FySummaryView view) {
		return null;
	}

	@Override
	public String dealCancelEvent(FySummaryView view, long userid, String message) {
		return null;
	}

	@Override
	public String dealStepBackEvent(FySummaryView view) {
		return null;
	}

}
